﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

//完成脚本和物体的分离
public class GameLoop : MonoBehaviour
{
    private SceneStateController controller = null;
    
    void Awake()
    {
        //限制不要删除它
        DontDestroyOnLoad(this.gameObject);
    }

    // Use this for initialization
	void Start ()
	{
	    controller = new SceneStateController();
	    controller.SetState(new StartSceneState(controller),false);
	}
	
	// Update is called once per frame
	void Update ()
	{
	    controller.StateUpdate();
	}
}
